package com.echat.messagesender.sender.service.impl;

import com.echat.messagesender.sender.bean.EchatSendSmsInfo;
import com.echat.messagesender.sender.email.bean.enumclass.EmailServerName;
import com.echat.messagesender.sender.model.SmsTemplate;
import com.echat.messagesender.sender.service.EchatSmsSendService;
import com.echat.messagesender.sender.sms.SmsSenderManager;
import com.weibo.api.motan.config.springsupport.annotation.MotanService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * Created by chenmohan on 2018/08/29
 *
 * @description
 */
@MotanService
public class EchatSmsSendServiceImpl implements EchatSmsSendService {

    @Autowired
    SmsSenderManager smsSenderManager;

    @Override
    public String printBean(EchatSendSmsInfo info) {
        return info.toString();
    }

    @Override
    public Boolean sendSMS(EchatSendSmsInfo info) {
        info.check();
        return smsSenderManager.sendSms(info);
    }

    @Override
    public Boolean sendSMS(EmailServerName type, EchatSendSmsInfo info) {
        return null;
    }

}
